import { defHttp } from '@/utils/http/axios';
import { BasicFetchResult } from '@/api/model/baseModel';
import { AddGraduationSchool, EditGraduationSchool, GraduationSchool } from './type';



enum Api {
    getGraduationSchoolList = '/admin/school/list',
    addGraduationSchool = '/admin/school/add',
    editGraduationSchool = '/admin/school/update',
    delGraduationSchool = '/admin/school/del'
}

/**
 * @description 查询学校列表
 * @date
 * @export
 * @param
 */
export function getGraduationSchoolList(params: any) {
    return defHttp.get<BasicFetchResult<GraduationSchool>>({
        url: Api.getGraduationSchoolList,
        params
    });
}

/**
 * 新增毕业学校
 * @param data 
 * @returns 
 */
export function addGraduationSchool(data: AddGraduationSchool) {
    return defHttp.post({
        url: Api.addGraduationSchool,
        data
    });
}

/**
 * 修改毕业学校
 * @param data 
 * @returns 
 */
export function editGraduationSchool(data: EditGraduationSchool) {
    return defHttp.post({
        url: Api.editGraduationSchool,
        data
    });
}

/**
 * 删除毕业学校
 * @param id 
 * @returns 
 */
export function delGraduationSchool(id: number) {
    return defHttp.post({
        url: Api.delGraduationSchool + '/' + id,
    });
}

